<?php
namespace app\spadmin\controller;
use app\common\controller\Backend;

class Rule extends Backend{

    public function _initialize()
    {
        parent::_initialize();
        $this->model = model('AuthRule');

        $this->assign('auth_menu',$this->auth->getMenuContentX());
    }

    public function index(){
        $this->request->filter(['strip_tags', 'trim']);
        if($this->request->isAjax()){
            $data = $this->request->param();
            $list =   $this->model->order('sort desc')->paginate(999999)->toArray();
            return $this->result($list);
        }
        return $this->view->fetch();
    }    
}